﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style TargetType="ProgressBar">
		<Setter Property="Foreground" Value="{DynamicResource ProgressBarForeground}" />
		<Setter Property="Background" Value="{DynamicResource White}" />
		<Setter Property="BorderBrush" Value="#FFBBBBBB" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="Height" Value="20" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ProgressBar">
					<Grid x:Name="Background" SnapsToDevicePixels="true">
						<Rectangle Fill="{TemplateBinding Background}" />
						<Border Margin="1" Background="{DynamicResource White}" />
						<Border Margin="1" Background="{DynamicResource White}" />
						<Rectangle x:Name="PART_Track" Margin="1" />
						<Decorator x:Name="PART_Indicator" HorizontalAlignment="Left" Margin="2">
							<Grid x:Name="Foreground">
								<Grid.ColumnDefinitions>
									<ColumnDefinition MaxWidth="15" />
									<ColumnDefinition Width="0.1*" />
									<ColumnDefinition MaxWidth="15" />
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition />
									<RowDefinition />
								</Grid.RowDefinitions>
								<Rectangle x:Name="Indicator" Fill="{TemplateBinding Foreground}" Grid.ColumnSpan="3"
										Grid.RowSpan="2" />
							</Grid>
						</Decorator>
						<Border BorderBrush="{TemplateBinding BorderBrush}"
								BorderThickness="{TemplateBinding BorderThickness}" />
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="Orientation" Value="Vertical">
							<Setter Property="LayoutTransform" TargetName="Background">
								<Setter.Value>
									<RotateTransform Angle="-90" />
								</Setter.Value>
							</Setter>
							<Setter Property="LayoutTransform" TargetName="PART_Track">
								<Setter.Value>
									<RotateTransform Angle="90" />
								</Setter.Value>
							</Setter>
							<Setter Property="LayoutTransform" TargetName="PART_Indicator">
								<Setter.Value>
									<RotateTransform Angle="90" />
								</Setter.Value>
							</Setter>
							<Setter Property="LayoutTransform" TargetName="Foreground">
								<Setter.Value>
									<RotateTransform Angle="-90" />
								</Setter.Value>
							</Setter>
						</Trigger>
						<Trigger Property="IsIndeterminate" Value="True">
							<Setter Property="Visibility" TargetName="Indicator" Value="Collapsed" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>